package com.dek.ssm.ch16.controller;

import java.math.BigDecimal;
import java.util.Date;
import org.springframework.format.annotation.NumberFormat;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class TestController {
	
	@RequestMapping("error")
	public void exception() {
		throw new RuntimeException ("测试异常跳转 ") ;
	}
	
	@RequestMapping("test")
	@ResponseBody
	public String test(Date date,@NumberFormat(pattern="##,###.00")BigDecimal decimal, Model model) {
		model.asMap().get("name");
		return "test";
	}
	
	
}
